#include "config.h"

#include <iostream>
#include <string>
#include <pybind11/pybind11.h>
#include <pybind11/functional.h>
#include <pybind11/stl.h>
#include <c2py/c2py.hpp>

#include "module.hpp"
#include "wrappers.hpp"
#include "generated_functions.h"

#include "oes_api/oes_api.h"
#include "mds_api/mds_api.h"


void generate_vnoes_functions_3(pybind11::module & parent)
{
    parent.def("OesApi_LogoutAll",
        &OesApi_LogoutAll,
        pybind11::return_value_policy::reference,
        pybind11::call_guard<pybind11::gil_scoped_release>()
    );
    parent.def("OesApi_DestoryAll",
        &OesApi_DestoryAll,
        pybind11::return_value_policy::reference,
        pybind11::call_guard<pybind11::gil_scoped_release>()
    );
    parent.def("OesApi_InitLogger",
        &OesApi_InitLogger,
        pybind11::return_value_policy::reference,
        pybind11::call_guard<pybind11::gil_scoped_release>()
    );
    parent.def("OesApi_ResetThreadLoggerName",
        &OesApi_ResetThreadLoggerName,
        pybind11::return_value_policy::reference,
        pybind11::call_guard<pybind11::gil_scoped_release>()
    );
    parent.def("OesApi_InitOrdChannel",
        c2py::inout_argument_transform < 
            c2py::function_constant<&OesApi_InitOrdChannel>,
            std::integral_constant<int, 4>
        >::value,
        pybind11::return_value_policy::reference,
        pybind11::call_guard<pybind11::gil_scoped_release>()
    );
    parent.def("OesApi_InitOrdChannel2",
        c2py::inout_argument_transform < 
            c2py::function_constant<&OesApi_InitOrdChannel2>,
            std::integral_constant<int, 2>
        >::value,
        pybind11::return_value_policy::reference,
        pybind11::call_guard<pybind11::gil_scoped_release>()
    );
    parent.def("OesApi_InitRptChannel",
        &OesApi_InitRptChannel,
        pybind11::return_value_policy::reference,
        pybind11::call_guard<pybind11::gil_scoped_release>()
    );
    parent.def("OesApi_InitRptChannel2",
        &OesApi_InitRptChannel2,
        pybind11::return_value_policy::reference,
        pybind11::call_guard<pybind11::gil_scoped_release>()
    );
    parent.def("OesApi_InitQryChannel",
        &OesApi_InitQryChannel,
        pybind11::return_value_policy::reference,
        pybind11::call_guard<pybind11::gil_scoped_release>()
    );
    parent.def("OesApi_InitQryChannel2",
        &OesApi_InitQryChannel2,
        pybind11::return_value_policy::reference,
        pybind11::call_guard<pybind11::gil_scoped_release>()
    );
    parent.def("OesApi_ParseAddrListString",
        &OesApi_ParseAddrListString,
        pybind11::return_value_policy::reference,
        pybind11::call_guard<pybind11::gil_scoped_release>()
    );
    parent.def("OesApi_ParseConfigFromFile",
        &OesApi_ParseConfigFromFile,
        pybind11::return_value_policy::reference,
        pybind11::call_guard<pybind11::gil_scoped_release>()
    );
    parent.def("OesApi_ParseAllConfig",
        &OesApi_ParseAllConfig,
        pybind11::return_value_policy::reference,
        pybind11::call_guard<pybind11::gil_scoped_release>()
    );
    parent.def("OesApi_InitChannelGroup",
        &OesApi_InitChannelGroup,
        pybind11::return_value_policy::reference,
        pybind11::call_guard<pybind11::gil_scoped_release>()
    );
    parent.def("OesApi_DestoryChannelGroup",
        &OesApi_DestoryChannelGroup,
        pybind11::return_value_policy::reference,
        pybind11::call_guard<pybind11::gil_scoped_release>()
    );
    parent.def("OesApi_AddToChannelGroup",
        &OesApi_AddToChannelGroup,
        pybind11::return_value_policy::reference,
        pybind11::call_guard<pybind11::gil_scoped_release>()
    );
    parent.def("OesApi_DeleteFromChannelGroup",
        &OesApi_DeleteFromChannelGroup,
        pybind11::return_value_policy::reference,
        pybind11::call_guard<pybind11::gil_scoped_release>()
    );
    parent.def("OesApi_GetFromChannelGroup",
        &OesApi_GetFromChannelGroup,
        pybind11::return_value_policy::reference,
        pybind11::call_guard<pybind11::gil_scoped_release>()
    );
    parent.def("OesApi_GetFromChannelGroupBySocket",
        &OesApi_GetFromChannelGroupBySocket,
        pybind11::return_value_policy::reference,
        pybind11::call_guard<pybind11::gil_scoped_release>()
    );
    parent.def("OesApi_ForeachInChannelGroup",
        c2py::c_function_callback_transform < 
            c2py::function_constant<&OesApi_ForeachInChannelGroup>,
            std::integral_constant<int, 1>
        >::value,
        pybind11::return_value_policy::reference,
        pybind11::call_guard<pybind11::gil_scoped_release>()
    );
}
void generate_vnoes_functions_4(pybind11::module & parent)
{
    parent.def("OesApi_SetThreadUsername",
        &OesApi_SetThreadUsername,
        pybind11::return_value_policy::reference,
        pybind11::call_guard<pybind11::gil_scoped_release>()
    );
    parent.def("OesApi_GetThreadUsername",
        &OesApi_GetThreadUsername,
        pybind11::return_value_policy::reference,
        pybind11::call_guard<pybind11::gil_scoped_release>()
    );
    parent.def("OesApi_SetThreadPassword",
        &OesApi_SetThreadPassword,
        pybind11::return_value_policy::reference,
        pybind11::call_guard<pybind11::gil_scoped_release>()
    );
    parent.def("OesApi_SetThreadEnvId",
        &OesApi_SetThreadEnvId,
        pybind11::return_value_policy::reference,
        pybind11::call_guard<pybind11::gil_scoped_release>()
    );
    parent.def("OesApi_GetThreadEnvId",
        &OesApi_GetThreadEnvId,
        pybind11::return_value_policy::reference,
        pybind11::call_guard<pybind11::gil_scoped_release>()
    );
    parent.def("OesApi_SetThreadSubscribeEnvId",
        &OesApi_SetThreadSubscribeEnvId,
        pybind11::return_value_policy::reference,
        pybind11::call_guard<pybind11::gil_scoped_release>()
    );
    parent.def("OesApi_GetThreadSubscribeEnvId",
        &OesApi_GetThreadSubscribeEnvId,
        pybind11::return_value_policy::reference,
        pybind11::call_guard<pybind11::gil_scoped_release>()
    );
    parent.def("OesApi_SetCustomizedIpAndMac",
        &OesApi_SetCustomizedIpAndMac,
        pybind11::return_value_policy::reference,
        pybind11::call_guard<pybind11::gil_scoped_release>()
    );
    parent.def("OesApi_SetCustomizedIp",
        &OesApi_SetCustomizedIp,
        pybind11::return_value_policy::reference,
        pybind11::call_guard<pybind11::gil_scoped_release>()
    );
    parent.def("OesApi_SetCustomizedMac",
        &OesApi_SetCustomizedMac,
        pybind11::return_value_policy::reference,
        pybind11::call_guard<pybind11::gil_scoped_release>()
    );
    parent.def("OesApi_GetCustomizedIp",
        &OesApi_GetCustomizedIp,
        pybind11::return_value_policy::reference,
        pybind11::call_guard<pybind11::gil_scoped_release>()
    );
    parent.def("OesApi_GetCustomizedMac",
        &OesApi_GetCustomizedMac,
        pybind11::return_value_policy::reference,
        pybind11::call_guard<pybind11::gil_scoped_release>()
    );
    parent.def("OesApi_SetCustomizedDriverId",
        &OesApi_SetCustomizedDriverId,
        pybind11::return_value_policy::reference,
        pybind11::call_guard<pybind11::gil_scoped_release>()
    );
    parent.def("OesApi_GetCustomizedDriverId",
        &OesApi_GetCustomizedDriverId,
        pybind11::return_value_policy::reference,
        pybind11::call_guard<pybind11::gil_scoped_release>()
    );
    parent.def("OesApi_GetClEnvId",
        &OesApi_GetClEnvId,
        pybind11::return_value_policy::reference,
        pybind11::call_guard<pybind11::gil_scoped_release>()
    );
    parent.def("OesApi_GetLastRecvTime",
        &OesApi_GetLastRecvTime,
        pybind11::return_value_policy::reference,
        pybind11::call_guard<pybind11::gil_scoped_release>()
    );
    parent.def("OesApi_GetLastSendTime",
        &OesApi_GetLastSendTime,
        pybind11::return_value_policy::reference,
        pybind11::call_guard<pybind11::gil_scoped_release>()
    );
    parent.def("OesApi_HasMoreCachedData",
        &OesApi_HasMoreCachedData,
        pybind11::return_value_policy::reference,
        pybind11::call_guard<pybind11::gil_scoped_release>()
    );
    parent.def("OesApi_IsValidOrdChannel",
        &OesApi_IsValidOrdChannel,
        pybind11::return_value_policy::reference,
        pybind11::call_guard<pybind11::gil_scoped_release>()
    );
    parent.def("OesApi_IsValidRptChannel",
        &OesApi_IsValidRptChannel,
        pybind11::return_value_policy::reference,
        pybind11::call_guard<pybind11::gil_scoped_release>()
    );
}
void generate_vnoes_functions_5(pybind11::module & parent)
{
    parent.def("OesApi_IsValidQryChannel",
        &OesApi_IsValidQryChannel,
        pybind11::return_value_policy::reference,
        pybind11::call_guard<pybind11::gil_scoped_release>()
    );
    parent.def("OesApi_IsValidChannelGroup",
        &OesApi_IsValidChannelGroup,
        pybind11::return_value_policy::reference,
        pybind11::call_guard<pybind11::gil_scoped_release>()
    );
    parent.def("OesApi_GetLastError",
        &OesApi_GetLastError,
        pybind11::return_value_policy::reference,
        pybind11::call_guard<pybind11::gil_scoped_release>()
    );
    parent.def("OesApi_SetLastError",
        &OesApi_SetLastError,
        pybind11::return_value_policy::reference,
        pybind11::call_guard<pybind11::gil_scoped_release>()
    );
    parent.def("OesApi_GetErrorMsg",
        &OesApi_GetErrorMsg,
        pybind11::return_value_policy::reference,
        pybind11::call_guard<pybind11::gil_scoped_release>()
    );
    parent.def("OesApi_GetErrorMsg2",
        &OesApi_GetErrorMsg2,
        pybind11::return_value_policy::reference,
        pybind11::call_guard<pybind11::gil_scoped_release>()
    );
    parent.def("OesHelper_ExtractOrdReportFromTrd",
        &OesHelper_ExtractOrdReportFromTrd,
        pybind11::return_value_policy::reference,
        pybind11::call_guard<pybind11::gil_scoped_release>()
    );
    parent.def("MdsApi_Logon",
        &MdsApi_Logon,
        pybind11::return_value_policy::reference,
        pybind11::call_guard<pybind11::gil_scoped_release>()
    );
    parent.def("MdsApi_LogonReplicaSet",
        &MdsApi_LogonReplicaSet,
        pybind11::return_value_policy::reference,
        pybind11::call_guard<pybind11::gil_scoped_release>()
    );
    parent.def("MdsApi_LogonPeerNodes",
        &MdsApi_LogonPeerNodes,
        pybind11::return_value_policy::reference,
        pybind11::call_guard<pybind11::gil_scoped_release>()
    );
    parent.def("MdsApi_SyncSubscribeOnLogon",
        &MdsApi_SyncSubscribeOnLogon,
        pybind11::return_value_policy::reference,
        pybind11::call_guard<pybind11::gil_scoped_release>()
    );
    parent.def("MdsApi_SubscribeMarketData",
        &MdsApi_SubscribeMarketData,
        pybind11::return_value_policy::reference,
        pybind11::call_guard<pybind11::gil_scoped_release>()
    );
    parent.def("MdsApi_SubscribeByString",
        &MdsApi_SubscribeByString,
        pybind11::return_value_policy::reference,
        pybind11::call_guard<pybind11::gil_scoped_release>()
    );
    parent.def("MdsApi_SubscribeByString2",
        c2py::string_array_transform < 
            c2py::function_constant<&MdsApi_SubscribeByString2>,
            std::integral_constant<int, 1>
        >::value,
        pybind11::return_value_policy::reference,
        pybind11::call_guard<pybind11::gil_scoped_release>()
    );
    parent.def("MdsApi_SubscribeByStringAndPrefixes",
        &MdsApi_SubscribeByStringAndPrefixes,
        pybind11::return_value_policy::reference,
        pybind11::call_guard<pybind11::gil_scoped_release>()
    );
    parent.def("MdsApi_SubscribeByStringAndPrefixes2",
        c2py::string_array_transform < 
            c2py::function_constant<&MdsApi_SubscribeByStringAndPrefixes2>,
            std::integral_constant<int, 1>
        >::value,
        pybind11::return_value_policy::reference,
        pybind11::call_guard<pybind11::gil_scoped_release>()
    );
    parent.def("MdsApi_SendHeartbeat",
        &MdsApi_SendHeartbeat,
        pybind11::return_value_policy::reference,
        pybind11::call_guard<pybind11::gil_scoped_release>()
    );
    parent.def("MdsApi_SendTestRequest",
        &MdsApi_SendTestRequest,
        pybind11::return_value_policy::reference,
        pybind11::call_guard<pybind11::gil_scoped_release>()
    );
    parent.def("MdsApi_Logout",
        &MdsApi_Logout,
        pybind11::return_value_policy::reference,
        pybind11::call_guard<pybind11::gil_scoped_release>()
    );
    parent.def("MdsApi_Destory",
        &MdsApi_Destory,
        pybind11::return_value_policy::reference,
        pybind11::call_guard<pybind11::gil_scoped_release>()
    );
}
void generate_vnoes_functions_6(pybind11::module & parent)
{
    parent.def("MdsApi_WaitOnMsg",
        c2py::c_function_callback_transform < 
            c2py::function_constant<&MdsApi_WaitOnMsg>,
            std::integral_constant<int, 2>
        >::value,
        pybind11::return_value_policy::reference,
        pybind11::call_guard<pybind11::gil_scoped_release>()
    );
    parent.def("MdsApi_WaitOnMsgCompressible",
        c2py::c_function_callback_transform < 
            c2py::function_constant<&MdsApi_WaitOnMsgCompressible>,
            std::integral_constant<int, 2>
        >::value,
        pybind11::return_value_policy::reference,
        pybind11::call_guard<pybind11::gil_scoped_release>()
    );
    parent.def("MdsApi_GetApiVersion",
        &MdsApi_GetApiVersion,
        pybind11::return_value_policy::reference,
        pybind11::call_guard<pybind11::gil_scoped_release>()
    );
    parent.def("MdsApi_QueryMktDataSnapshot",
        &MdsApi_QueryMktDataSnapshot,
        pybind11::return_value_policy::reference,
        pybind11::call_guard<pybind11::gil_scoped_release>()
    );
    parent.def("MdsApi_QuerySecurityStatus",
        &MdsApi_QuerySecurityStatus,
        pybind11::return_value_policy::reference,
        pybind11::call_guard<pybind11::gil_scoped_release>()
    );
    parent.def("MdsApi_QueryTrdSessionStatus",
        &MdsApi_QueryTrdSessionStatus,
        pybind11::return_value_policy::reference,
        pybind11::call_guard<pybind11::gil_scoped_release>()
    );
    parent.def("MdsApi_QueryStockStaticInfo",
        c2py::c_function_callback_transform < 
            c2py::function_constant<&MdsApi_QueryStockStaticInfo>,
            std::integral_constant<int, 2>
        >::value,
        pybind11::return_value_policy::reference,
        pybind11::call_guard<pybind11::gil_scoped_release>()
    );
    parent.def("MdsApi_QuerySnapshotList",
        c2py::c_function_callback_transform < 
            c2py::function_constant<&MdsApi_QuerySnapshotList>,
            std::integral_constant<int, 4>
        >::value,
        pybind11::return_value_policy::reference,
        pybind11::call_guard<pybind11::gil_scoped_release>()
    );
    parent.def("MdsApi_QuerySnapshotList2",
        c2py::apply_function_transform<
            c2py::function_constant<&MdsApi_QuerySnapshotList2>,
            brigand::list<
                c2py::indexed_transform_holder<c2py::c_function_callback_transform, 4>,
                c2py::indexed_transform_holder<c2py::string_array_transform, 1>
            >
        >::value,
        pybind11::return_value_policy::reference,
        pybind11::call_guard<pybind11::gil_scoped_release>()
    );
    parent.def("MdsApi_SendChangePasswordReq",
        &MdsApi_SendChangePasswordReq,
        pybind11::return_value_policy::reference,
        pybind11::call_guard<pybind11::gil_scoped_release>()
    );
    parent.def("MdsApi_ConnectToUdpMcast",
        &MdsApi_ConnectToUdpMcast,
        pybind11::return_value_policy::reference,
        pybind11::call_guard<pybind11::gil_scoped_release>()
    );
    parent.def("MdsApi_WaitOnUdpMsg",
        c2py::c_function_callback_transform < 
            c2py::function_constant<&MdsApi_WaitOnUdpMsg>,
            std::integral_constant<int, 2>
        >::value,
        pybind11::return_value_policy::reference,
        pybind11::call_guard<pybind11::gil_scoped_release>()
    );
    parent.def("MdsApi_InitAll",
        &MdsApi_InitAll,
        pybind11::return_value_policy::reference,
        pybind11::call_guard<pybind11::gil_scoped_release>()
    );
    parent.def("MdsApi_InitAllByConvention",
        &MdsApi_InitAllByConvention,
        pybind11::return_value_policy::reference,
        pybind11::call_guard<pybind11::gil_scoped_release>()
    );
    parent.def("MdsApi_InitAllByCfgStruct",
        &MdsApi_InitAllByCfgStruct,
        pybind11::return_value_policy::reference,
        pybind11::call_guard<pybind11::gil_scoped_release>()
    );
    parent.def("MdsApi_LogoutAll",
        &MdsApi_LogoutAll,
        pybind11::return_value_policy::reference,
        pybind11::call_guard<pybind11::gil_scoped_release>()
    );
    parent.def("MdsApi_DestoryAll",
        &MdsApi_DestoryAll,
        pybind11::return_value_policy::reference,
        pybind11::call_guard<pybind11::gil_scoped_release>()
    );
    parent.def("MdsApi_InitLogger",
        &MdsApi_InitLogger,
        pybind11::return_value_policy::reference,
        pybind11::call_guard<pybind11::gil_scoped_release>()
    );
    parent.def("MdsApi_ResetThreadLoggerName",
        &MdsApi_ResetThreadLoggerName,
        pybind11::return_value_policy::reference,
        pybind11::call_guard<pybind11::gil_scoped_release>()
    );
    parent.def("MdsApi_InitTcpChannel",
        &MdsApi_InitTcpChannel,
        pybind11::return_value_policy::reference,
        pybind11::call_guard<pybind11::gil_scoped_release>()
    );
}
